gtk_separator_menu_item_get_type
gtk_separator_tool_item_get_type
gtk_settings_get_type
+gtk_shortcuts_label_get_type
gtk_shortcuts_window_get_type
gtk_shortcuts_section_get_type
gtk_shortcuts_group_get_type
gtkseparatormenuitem.h \
gtkseparatortoolitem.h \
gtksettings.h \
+ gtkshortcutlabel.h \
gtkshortcutsgroup.h \
gtkshortcutssection.h \
gtkshortcutsshortcut.h \
gtksearchentryprivate.h \
gtkselectionprivate.h \
gtksettingsprivate.h \
- gtkshortcutlabelprivate.h \
gtkshortcutswindowprivate.h \
gtkshortcutsshortcutprivate.h \
gtksidebarrowprivate.h \
#include <gtk/gtkseparatormenuitem.h>
#include <gtk/gtkseparatortoolitem.h>
#include <gtk/gtksettings.h>
+#include <gtk/gtkshortcutlabel.h>
#include <gtk/gtkshortcutsgroup.h>
#include <gtk/gtkshortcutssection.h>
#include <gtk/gtkshortcutsshortcut.h>
#include "config.h"
-#include "gtkshortcutlabelprivate.h"
+#include "gtkshortcutlabel.h"
#include "gtklabel.h"
#include "gtkframe.h"
#include "gtkstylecontext.h"
#include "gtkprivate.h"
#include "gtkintl.h"
+/**
+ * SECTION:gtkshortcutlabel
+ * @Title: GtkShortcutLabel
+ * @Short_description: Displays a keyboard shortcut
+ * @See_also: #GtkCellRendererAccel
+ *
+ * #GtkShortcutLabel is a widget that represents a single keyboard shortcut or gesture
+ * in the user interface.
+ */
+
struct _GtkShortcutLabel
{
GtkBox parent_instance;
object_class->get_property = gtk_shortcut_label_get_property;
object_class->set_property = gtk_shortcut_label_set_property;
+ /**
+ * GtkShortcutLabel:accelerator:
+ *
+ * The accelerator that @self displays. See #GtkShortcutsShortcut:accelerator
+ * for the accepted syntax.
+ *
+ * Since: 3.22
+ */
properties[PROP_ACCELERATOR] =
g_param_spec_string ("accelerator", P_("Accelerator"), P_("Accelerator"),
NULL,
gtk_box_set_spacing (GTK_BOX (self), 6);
}
+/**
+ * gtk_shortcut_label_new:
+ * @accelerator: the initial accelerator
+ *
+ * Creates a new #GtkShortcutLabel with @accelerator set.
+ *
+ * Returns: (transfer full): a newly-allocated #GtkShortcutLabel
+ *
+ * Since: 3.22
+ */
GtkWidget *
gtk_shortcut_label_new (const gchar *accelerator)
{
NULL);
}
+/**
+ * gtk_shortcut_label_get_accelerator:
+ * @self: a #GtkShortcutLabel
+ *
+ * Retrieves the current accelerator of @self.
+ *
+ * Returns: (transfer none)(nullable): the current accelerator.
+ *
+ * Since: 3.22
+ */
const gchar *
gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self)
{
return self->accelerator;
}
+/**
+ * gtk_shortcut_label_set_accelerator:
+ * @self: a #GtkShortcutLabel
+ * @accelerator: the new accelerator
+ *
+ * Sets the accelerator to be displayed by @self.
+ *
+ * Since: 3.22
+ */
void
gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self,
const gchar *accelerator)
--- /dev/null
+/* gtkshortcutlabelprivate.h
+ *
+ * Copyright (C) 2015 Christian Hergert <christian@hergert.me>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_SHORTCUT_LABEL_H__
+#define __GTK_SHORTCUT_LABEL_H__
+
+#include <gtk/gtkbox.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_SHORTCUT_LABEL (gtk_shortcut_label_get_type())
+#define GTK_SHORTCUT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabel))
+#define GTK_SHORTCUT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabelClass))
+#define GTK_IS_SHORTCUT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUT_LABEL))
+#define GTK_IS_SHORTCUT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUT_LABEL))
+#define GTK_SHORTCUT_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabelClass))
+
+
+typedef struct _GtkShortcutLabel GtkShortcutLabel;
+typedef struct _GtkShortcutLabelClass GtkShortcutLabelClass;
+
+GDK_AVAILABLE_IN_3_22
+GType gtk_shortcut_label_get_type (void) G_GNUC_CONST;
+
+GDK_AVAILABLE_IN_3_22
+GtkWidget *gtk_shortcut_label_new (const gchar *accelerator);
+
+GDK_AVAILABLE_IN_3_22
+const gchar *gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self);
+
+GDK_AVAILABLE_IN_3_22
+void gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self,
+ const gchar *accelerator);
+
+G_END_DECLS
+
+#endif /* __GTK_SHORTCUT_LABEL_H__ */
+++ /dev/null
-/* gtkshortcutlabelprivate.h
- *
- * Copyright (C) 2015 Christian Hergert <christian@hergert.me>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GTK_SHORTCUT_LABEL_H__
-#define __GTK_SHORTCUT_LABEL_H__
-
-#include <gtk/gtkbox.h>
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_SHORTCUT_LABEL (gtk_shortcut_label_get_type())
-#define GTK_SHORTCUT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabel))
-#define GTK_SHORTCUT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabelClass))
-#define GTK_IS_SHORTCUT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUT_LABEL))
-#define GTK_IS_SHORTCUT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUT_LABEL))
-#define GTK_SHORTCUT_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUT_LABEL, GtkShortcutLabelClass))
-
-
-typedef struct _GtkShortcutLabel GtkShortcutLabel;
-typedef struct _GtkShortcutLabelClass GtkShortcutLabelClass;
-
-
-GType gtk_shortcut_label_get_type (void) G_GNUC_CONST;
-
-GtkWidget *gtk_shortcut_label_new (const gchar *accelerator);
-const gchar *gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self);
-void gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self,
- const gchar *accelerator);
-
-G_END_DECLS
-
-#endif /* __GTK_SHORTCUT_LABEL_H__ */
#include "gtkshortcutsshortcut.h"
-#include "gtkshortcutlabelprivate.h"
+#include "gtkshortcutlabel.h"
#include "gtkshortcutswindowprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"